package com.winexpress.order;

import com.winexpress.entity.OrderHistory;
import com.winexpress.session.order.OrderMessage;
import com.winexpress.session.order.OrderSessionBean;
import java.util.List;
import javax.ejb.EJB;
import javax.jws.WebService;

@WebService(serviceName = "OrderManagementWS")
public class OrderManagementWS {
    
    @EJB
    private OrderSessionBean orderSessionBean;
    
    public List<OrderHistory> viewOrders(long userID) throws Exception {
        return orderSessionBean.viewOrders(userID);
    }
    
    public OrderHistory createOrder(OrderMessage inMessage) {
        return orderSessionBean.createOrder(inMessage);
    }
    
    public OrderHistory completeOrder(OrderHistory oh) {
        return orderSessionBean.completeOrder(oh);
    }
}
